import Vue from 'vue'
import VueRouter from "vue-router";
import HelloWorld from "@/components/HelloWorld";
import LoginView from "@/views/LoginView";
import RegisterView from "@/views/RegisterView";
import IndexView from "@/views/IndexView";
import KgcView from "@/components/KgcView";

//  扩展vue的路由功能
Vue.use(VueRouter)


//  创建路由列表
const routes = [
    {
        path:'/',
        redirect:'/login'
    },
    {
        path:'/login',
       component: LoginView
    },
    {
        path:'/register',
        component: RegisterView
    },
    {
        path:'/index',
        component: IndexView
    },
    {
        path:'/hello',
        component:HelloWorld
    },
    {
        path:'/kgc',
        component:KgcView
    }
]
//  创建路由对象
const  router  = new  VueRouter({
    routes
})

export  default  router
